/**
 * @Author: Bobby
 * @Date: 2022-02-15 13:14:17
 * @LastEditTime: 2022-03-07 10:37:41
 * @LastEditors: Bobby
 * @Description:
 * @FilePath: \wms-v2\src\ve\common\components\baseComs\layout\uiFlexbox.js
 * @CIMC-V2
 */
import { exInput, exSwitch } from '@ve/common/components/extension'
import { componentId } from '@/utils/unique'
export default {
  VERSION: '20220408',
  type: 'uiPackDetails',
  name: '包装盒子',
  icon: 'checkbox-blank-line',
  svg: 'baozhuanghezi',
  //数据别名
  // dataName: 'uiFlexbox_data',
  //扩展
  data: {
    //子元素
    formItems: {},
    requestData: {},
    _formData: {},
    //表单数据
    formData: {
      header: {},
      detail: [
        { PACK_LEVEL: 'EA', QTY: 1, DESCRC: 'EA', SO_SPILT: 'N', RP_SPILT: 'N', RCV_SPILT: 'N', CAT_FLAG: 'Y' },
        { PACK_LEVEL: 'IP', QTY: 0, DESCRC: 'IP', SO_SPILT: 'N', RP_SPILT: 'N', RCV_SPILT: 'N', CAT_FLAG: 'Y' },
        { PACK_LEVEL: 'CS', QTY: 0, DESCRC: 'CS', SO_SPILT: 'N', RP_SPILT: 'N', RCV_SPILT: 'N', CAT_FLAG: 'Y' },
        { PACK_LEVEL: 'PL', QTY: 0, DESCRC: 'PL', SO_SPILT: 'N', RP_SPILT: 'N', RCV_SPILT: 'N', CAT_FLAG: 'Y' },
        { PACK_LEVEL: 'OT', QTY: 0, DESCRC: 'OT', SO_SPILT: 'N', RP_SPILT: 'N', RCV_SPILT: 'N', CAT_FLAG: 'Y' },
      ],
    },
  },
  extension: {
    getFrom: {
      type: 'exGetDownload',
      name: '绑定表单',
      title: '绑定表单',
      value: [],
      hasCheckbox: false,
      treeData: '$getPageModules',
    },
    padding: {
      type: 'exInputNumber',
      name: '内边距',
      value: 1,
      min: 0,
      max: 12,
    },
    justify: {
      type: 'exJustifySelect',
      name: '换行',
      value: 'flex-wrap',
    },
    shadow: {
      type: 'exShadowSelect',
      name: '盒阴影',
      value: 'shadow-none',
    },
    border: {
      type: 'exBorderSelect',
      name: '边框厚度',
      value: 'border-0',
    },
    rounded: {
      type: 'exRoundedSelect',
      name: '边框圆角',
      value: 'rounded-none',
    },
    bg: {
      type: 'exBgColorSelect',
      name: '背景颜色',
      value: 'bg-white',
    },
  },
  list: [
    {
      _id: `uiPackDetails_${componentId(6)}`,
      type: 'uiPackDetailsItem',
      name: '包装详情-表单1',
      label: '包装详情-表单1',
      list: [],
      data: {
        //子元素
        formItems: {},
        requestData: {},
        //表单数据
        formData: {},
      },
      rules: {},
      extension: {
        layout: {
          type: 'exRadioGroup',
          name: '排版列数',
          value: '1',
          list: [
            { value: '1', label: '1列' },
            { value: '2', label: '2列' },
            { value: '3', label: '3列' },
            { value: '4', label: '4列' },
          ],
        },
        labelPosition: {
          type: 'exRadioGroup',
          name: '标签对齐',
          value: 'left',
          list: [
            { value: 'top', label: '顶对齐' },
            { value: 'left', label: '左对齐' },
            { value: 'right', label: '右对齐' },
          ],
        },
      },
      interaction: [],
      logicInstruction: [],
      dataSourceBind: {
        sourceId: { type: 'exGetDataSource', name: '组件ID', value: { type: 1, source: [] } },
        getDataKey: {
          type: 'exInput',
          name: '数据Key',
          value: '',
          tooltip: '获取数据的 key 的集合，多个 key 用 “,” 分隔，如需获取全部数据则不填写',
        },
        hasParam: { type: 'exSwitch', name: '当参数用', value: false, tooltip: '默认当数据使用,开启当参数使用' },
      },
    },
    {
      _id: `uiPackDetails_${componentId(6)}`,
      type: 'uiPackDetailsItem',
      name: '包装详情-表单2',
      label: '包装详情-表单2',
      list: [],
      data: {
        //子元素
        formItems: {},
        requestData: {},
        //表单数据
        formData: {},
      },
      rules: {},
      extension: {
        layout: {
          type: 'exRadioGroup',
          name: '排版列数',
          value: '1',
          list: [
            { value: '1', label: '1列' },
            { value: '2', label: '2列' },
            { value: '3', label: '3列' },
            { value: '4', label: '4列' },
          ],
        },
        labelPosition: {
          type: 'exRadioGroup',
          name: '标签对齐',
          value: 'left',
          list: [
            { value: 'top', label: '顶对齐' },
            { value: 'left', label: '左对齐' },
            { value: 'right', label: '右对齐' },
          ],
        },
      },
      interaction: [],
      logicInstruction: [],
      dataSourceBind: {
        sourceId: { type: 'exGetDataSource', name: '组件ID', value: { type: 1, source: [] } },
        getDataKey: {
          type: 'exInput',
          name: '数据Key',
          value: '',
          tooltip: '获取数据的 key 的集合，多个 key 用 “,” 分隔，如需获取全部数据则不填写',
        },
        hasParam: { type: 'exSwitch', name: '当参数用', value: false, tooltip: '默认当数据使用,开启当参数使用' },
      },
    },
    {
      _id: `uiPackDetails_${componentId(6)}`,
      type: 'uiPackDetailsItem',
      name: '包装详情-表单3',
      label: '包装详情-表单3',
      list: [],
      data: {
        //子元素
        formItems: {},
        requestData: {},
        //表单数据
        formData: {},
      },
      rules: {},
      extension: {
        layout: {
          type: 'exRadioGroup',
          name: '排版列数',
          value: '1',
          list: [
            { value: '1', label: '1列' },
            { value: '2', label: '2列' },
            { value: '3', label: '3列' },
            { value: '4', label: '4列' },
          ],
        },
        labelPosition: {
          type: 'exRadioGroup',
          name: '标签对齐',
          value: 'left',
          list: [
            { value: 'top', label: '顶对齐' },
            { value: 'left', label: '左对齐' },
            { value: 'right', label: '右对齐' },
          ],
        },
      },
      interaction: [],
      logicInstruction: [],
      dataSourceBind: {
        sourceId: { type: 'exGetDataSource', name: '组件ID', value: { type: 1, source: [] } },
        getDataKey: {
          type: 'exInput',
          name: '数据Key',
          value: '',
          tooltip: '获取数据的 key 的集合，多个 key 用 “,” 分隔，如需获取全部数据则不填写',
        },
        hasParam: { type: 'exSwitch', name: '当参数用', value: false, tooltip: '默认当数据使用,开启当参数使用' },
      },
    },
    {
      _id: `uiPackDetails_${componentId(6)}`,
      type: 'uiPackDetailsItem',
      name: '包装详情-表单4',
      label: '包装详情-表单4',
      list: [],
      data: {
        //子元素
        formItems: {},
        requestData: {},
        //表单数据
        formData: {},
      },
      rules: {},
      extension: {
        layout: {
          type: 'exRadioGroup',
          name: '排版列数',
          value: '1',
          list: [
            { value: '1', label: '1列' },
            { value: '2', label: '2列' },
            { value: '3', label: '3列' },
            { value: '4', label: '4列' },
          ],
        },
        labelPosition: {
          type: 'exRadioGroup',
          name: '标签对齐',
          value: 'left',
          list: [
            { value: 'top', label: '顶对齐' },
            { value: 'left', label: '左对齐' },
            { value: 'right', label: '右对齐' },
          ],
        },
      },
      interaction: [],
      logicInstruction: [],
      dataSourceBind: {
        sourceId: { type: 'exGetDataSource', name: '组件ID', value: { type: 1, source: [] } },
        getDataKey: {
          type: 'exInput',
          name: '数据Key',
          value: '',
          tooltip: '获取数据的 key 的集合，多个 key 用 “,” 分隔，如需获取全部数据则不填写',
        },
        hasParam: { type: 'exSwitch', name: '当参数用', value: false, tooltip: '默认当数据使用,开启当参数使用' },
      },
    },
    {
      _id: `uiPackDetails_${componentId(6)}`,
      type: 'uiPackDetailsItem',
      name: '包装详情-表单5',
      label: '包装详情-表单5',
      list: [],
      data: {
        //子元素
        formItems: {},
        requestData: {},
        //表单数据
        formData: {},
      },
      rules: {},
      extension: {
        layout: {
          type: 'exRadioGroup',
          name: '排版列数',
          value: '1',
          list: [
            { value: '1', label: '1列' },
            { value: '2', label: '2列' },
            { value: '3', label: '3列' },
            { value: '4', label: '4列' },
          ],
        },
        labelPosition: {
          type: 'exRadioGroup',
          name: '标签对齐',
          value: 'left',
          list: [
            { value: 'top', label: '顶对齐' },
            { value: 'left', label: '左对齐' },
            { value: 'right', label: '右对齐' },
          ],
        },
      },
      interaction: [],
      logicInstruction: [],
      dataSourceBind: {
        sourceId: { type: 'exGetDataSource', name: '组件ID', value: { type: 1, source: [] } },
        getDataKey: {
          type: 'exInput',
          name: '数据Key',
          value: '',
          tooltip: '获取数据的 key 的集合，多个 key 用 “,” 分隔，如需获取全部数据则不填写',
        },
        hasParam: { type: 'exSwitch', name: '当参数用', value: false, tooltip: '默认当数据使用,开启当参数使用' },
      },
    },
  ],
  //数据源绑定
  dataSourceBind: {
    sourceId: {
      type: 'exGetDataSource',
      name: '组件ID',
      value: {
        type: 1,
        source: [],
      },
    },
    // dataKey: exInput('数据Key', ''),
    getDataKey: exInput('数据Key', '', '获取数据的 key 的集合，多个 key 用 “,” 分隔，如需获取全部数据则不填写'),
    hasParam: exSwitch('当参数用', false, '默认当数据使用,开启当参数使用'),
  },
}
